<?php


// no direct access
defined('_JEXEC') or die('Restricted access');

jimport( 'joomla.application.component.view');
require_once JPATH_COMPONENT.DS.'/helpers/functions.check.php';
require_once JPATH_COMPONENT.DS.'/helpers/functions.moderator.php';
/**
 * HTML View class for the eventcalendar component
 */
class EventcalendarViewMuokkaaevent extends JView {

	function display($tpl = null) 
	{
		
		$model = $this->getModel('Muokkaaevent');
		$id = JRequest::getVar( 'id' );
		
		$events = $model->getEvent($id);
		
		foreach ($events as $eve)
		{
				$event = $eve;
		}
		
		
        $this->assignRef('event', $event );
	
		//Paikka
		$position = $model->getPosition($events[0]->position_id);
		$this->assignRef('position', $position );
		
		//Kuva
		$picture = $model->getPicture($id);
		$this->assignRef('picture', $picture);	
		//$this->assignRef('moderaattori', $moderaattori);
	
		parent::display($tpl);

	}

	
	
	
}
?>
